<link rel="stylesheet" type="text/css" href="{$smarty.const.BASE_URL}/modules/duanmodule/css/duanmodule.css" />
<div class="duanmodule default">
    <h1>{$page_title}</h1>
	<ul class="default_list">
	{foreach name=links from=$projects item=project name=forloop}
		<li {if $project->pstate == 0}class="unapprove"{/if} {if $smarty.foreach.forloop.last == 1}style='border: 0px;'{/if}>
        	{permissions level=$smarty.const.UILEVEL_NORMAL}
            {if $permissions.edit == 1 || $permissions.delete == 1}
			<div class="itemactions">
				{if $permissions.edit == 1}
				<a href="{link action=edit id=$project->id}"><img class="mngmnt_icon" src="{$smarty.const.ICON_RELATIVE}edit.png" title="{$_TR.alt_edit}" alt="{$_TR.alt_edit}" /></a>
				{/if}
				{if $permissions.delete == 1}
				<a href="{link action=delete id=$project->id}"><img class="mngmnt_icon" src="{$smarty.const.ICON_RELATIVE}delete.png" title="{$_TR.alt_delete}" alt="{$_TR.alt_delete}" onclick="return confirm('{$_TR.delete_link_confirm}');" /></a>
				{/if}
			</div>
            {/if}
            {/permissions}
            {if $project->thumbnail_path != ''}
                <div class="thumb">
                    <a href="{link action=view module=duanmodule id=$project->shortname src=$project->src}" title="{$project->name}">
                        <img src="{$smarty.const.BASE_URL}/phpThumb.php?src={$project->thumbnail_path}&w=100">
                    </a>
                </div>
            {/if}
            <div class="project_location">
                <a href="{link action=view id=$project->pshortname}"><b>{$project->pname}</b></a>&nbsp;-&nbsp;<a class="ward" href="{link action=view id=$project->wshortname}">{$project->wname}</a>
            </div>
            <div class="project_name">
                <a href="{link action=view module=duanmodule id=$project->shortname src=$project->src}" title="{$project->name}">{$project->name}</a>
            </div>
            <div class="project_date_full">
                {$project->date_full}
            </div>
            <div class="des">
                {$project->seo_des}
                <div class="project_more">
                <a href="{link action=view module=duanmodule id=$project->shortname src=$project->src}" title="Chi tiết dự án {$project->name}">Chi tiết</a>
                </div>
            </div>
            <div style="clear: both;"></div>
		</li>
	{foreachelse}
	<li align="center"><i>{$_TR.no_link}</i></li>
	{/foreach}
	</ul>
    
    {paging current_page=$page pages=$pages action=view module=duanmodule page_length=4 src=$__loc->src}
    
	<div class="actions">
		{permissions level=$smarty.const.UILEVEL_NORMAL}
		{if $permissions.create == 1}
			<a class="new_project" href="{link action=edit}">{$_TR.new_link}</a>
		{/if}
        {if $permissions.administrate == true}
            <a class="collection_management" href="{link action=collection_management}">{$_TR.collection_management}</a>
        {/if}
		{/permissions}
	</div>	
</div>
